#ifndef __KEY_H_
#define __KEY_H_

#include "sys.h"

#define KEY_PORT GPIOC
#define KEY_PORT_RCC RCC_APB2Periph_GPIOC
#define KEY1_PIN GPIO_Pin_0
#define KEY2_PIN GPIO_Pin_1
#define KEY3_PIN GPIO_Pin_4
#define KEY4_PIN GPIO_Pin_5


struct keys
{
	unsigned char keyFlag;
	unsigned int keyTime;
	bool keyState;
	bool keyShortDown;
	bool keyLongDown;
};

extern struct keys key[4];

void Key_Init(void);
void keyScan(void);

#endif
